
//
//  UserInfoModel.m
//  PropertyMananger
//
//  Created by bh on 17/1/9.
//  Copyright © 2017年 BH. All rights reserved.
//

#import "UserInfoModel.h"

@implementation PermissionDatamModel

@end

@implementation CommunitylistModel

@end

//static UserInfoModel * userInfoModel = nil;
@implementation UserInfoModel

//+ (instancetype)shareInstance{
//
//    static  dispatch_once_t  onceToken;
//    
//    dispatch_once ( &onceToken, ^ {
//        
//        userInfoModel = [[ UserInfoModel alloc ] init] ;
//        
//    } );
//    
//    return userInfoModel;
//
//}
//+(id) allocWithZone:(struct _NSZone *)zone {
//    
//    return [UserInfoModel shareInstance] ;
//    
//}
//
//-(id) copyWithZone:(struct _NSZone *)zone {
//    
//    return [UserInfoModel shareInstance] ;
//    
//}

-(void)setValue:(id)value forUndefinedKey:(NSString *)key{

    if([key isEqualToString:@"PermissionData"]){
        PermissionDatamModel * permissionData = [[PermissionDatamModel alloc] init];
        [permissionData setValuesForKeysWithDictionary:value];
    
    }else if([key isEqualToString:@"communitylist"]){
    
        for(NSDictionary * dict in value){
            CommunitylistModel * list = [[CommunitylistModel alloc] init];
            [list setValuesForKeysWithDictionary:dict];
            DLog(@"---------%@",list.companydescribe);
            [self.listArr addObject:list];
           
        }
       
    }

}

-(NSMutableArray *)listArr{
    if(!_listArr){
    
        _listArr = [[NSMutableArray alloc]init];
    }
    return _listArr;

}
@end
